<template>
  <div class="MARGIN_TOP">
    <el-table :data="tableData" border highlight-current-row stripe>
      <el-table-column type="index" label="序号" width="120" align="center">
      </el-table-column>

      <el-table-column
        v-for="(item, index) in customTableItem"
        :key="index"
        :prop="item.prop"
        :label="item.label"
        :width="item.width"
        :align="item.align"
        show-overflow-tooltip
      >
        <template v-if="item.prop == 'sourceSite'" #default="scope">
          <el-button
            v-for="(_item, _index) in item.configList"
            :key="_index"
            type="text"
            :style="`color:${_item.color}`"
            @click="clickHandlerBtn(_item, scope.row)"
          >
            {{ _item.label }}
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup>

const props = defineProps({
  customTableItem: Array,
  page: Object,
  tableData: Array,
});
const emit = defineEmits(["btnConfig", "delete"]);
function clickHandlerBtn(btnConfig, row) {
  emit("btnConfig", btnConfig, row);
}
</script>

<style lang="scss" scoped>
</style>